package com.wu.mongo;

import lombok.AllArgsConstructor;
import lombok.Data;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author Cousin
 * @date 2025/4/1
 * @Description
 */
@Document(collection = "rank_detail")
@Data
public class RankDetail {
    private ObjectId id;
    private ObjectId rankId;
    private String title;
    private String artists;
    private Integer duration;
    private Album album;
    private String cover;
    private String url;
    private Integer rank;
    private Integer lastRank;
    public RankDetail(ObjectId rankId, String title, String artists, Integer duration, Album album, String cover, String url, Integer rank, Integer lastRank) {
        this.rankId = rankId;
        this.title = title;
        this.artists = artists;
        this.duration = duration;
        this.album = album;
        this.cover = cover;
        this.url = url;
        this.rank = rank;
        this.lastRank=lastRank;
    }
    @Data
    @AllArgsConstructor
   public static class Album {
        private String id;
        private String title;
        private String cover;
    }

}
